import http from "@/api/axios";
//海外仓运单列表
export const getWarehouseShipmentListApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/warehouseOrderShipment/pageData",
    data
  });
};

//海外仓报价运单列表
export const getquotationPageListApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/warehouseShipmentQuotation/quotationPage",
    data
  });
};

//海外仓运单-报价列表统计
export const quotationPageStatApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/warehouseShipmentQuotation/quotationPageStat",
    data
  });
};

//运单-海外仓运单-未下单列表
export const getOrderShipmentWarehouseListApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/orderShipmentWarehouse/pageData",
    data
  });
};

export const getWarehouseShipmentPageStatApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/warehouseOrderShipment/pageStat",
    data
  });
};

//海外仓运单-查看运单报价日志列表
export const quotationLogListApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/warehouseShipmentQuotation/quotationLogList",
    data
  });
};

//海外仓运单 - 确认下单
export const enterWarehouseOrderApi = (data: string[]) => {
  return http({
    method: "post",
    url: "/base/biz/warehouseOrderShipment/enterWarehouseOrder",
    data
  });
};

//海外仓运单 - 取消下单
export const cancelWarehouseOrderApi = (data: string[]) => {
  return http({
    method: "post",
    url: "/base/biz/warehouseOrderShipment/cancelWarehouseOrder",
    data
  });
};

//海外仓运单 - 出运
export const outShipmentApi = (data: string[]) => {
  return http({
    method: "post",
    url: "/base/biz/warehouseOrderShipment/outShipment",
    data
  });
};

//海外仓运单 - 签收
export const signWarehouseOrderApi = (data: string[]) => {
  return http({
    method: "post",
    url: "/base/biz/warehouseOrderShipment/signWarehouseOrder",
    data
  });
};

//海外仓运单 - 新增下单
export const saveWarehouseOrderpi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/warehouseOrderShipment/saveWarehouseOrder",
    data
  });
};

//海外仓运单 - 新增下单
export const warehouseShipmentExcelApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/export/biz/exportExcel/warehouseShipmentExcel",
    data,
    responseType: "blob"
  });
};

//海外仓运单-查看报价详情
export const quotationApi = (id: string) => {
  return http({
    method: "get",
    url: `/base/biz/warehouseOrderShipment/detail/${id}`
  });
};

//查询海外仓运单费用列表
export const warehouseOrderShipmentCostApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: `/base/biz/warehouseOrderShipmentCost/queryList`,
    data
  });
};

//添加海外仓运单费用
export const AddwarehouseOrderShipmentCostApi = (data: WarehouseWaybill.CustomerLevel) => {
  return http({
    method: "post",
    url: `/base/biz/warehouseOrderShipmentCost/add`,
    data
  });
};

//删除海外仓运单费用
export const deleteWarehouseOrderShipmentCostApi = (params: { id: string }) => {
  return http({
    method: "delete",
    url: `/base/biz/warehouseOrderShipmentCost/deleteById`,
    params
  });
};

//海外仓运单-提交报价
export const warehouseShipmentQuotationApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: `/base/biz/warehouseShipmentQuotation/submit`,
    data
  });
};

//海外仓运单-查看详情
export const warehouseOrderShipmentDetailApi = (warehouseBillNum: string) => {
  return http({
    method: "get",
    url: `/base/biz/warehouseOrderShipment/detail/${warehouseBillNum}`
  });
};

//上传海外仓运单附件信息
export const saveWarehouseOrderAnnexApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: `/base/biz/warehouseOrderShipment/saveWarehouseOrderAnnex`,
    data
  });
};

//海外仓运单-查看发票
export const getWarehouseShipmentDetailApi = (warehouseBillNum: string) => {
  return http({
    method: "get",
    url: `/base/biz/warehouseOrderShipment/getWarehouseShipmentDetail/${warehouseBillNum}`
  });
};

//海外仓运单-修改发票
export const updateWarehouseOrderApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: `/base/biz/warehouseOrderShipment/updateWarehouseOrder`,
    data
  });
};

//报海外仓运单报价审批-查看海外仓运单报价
export const getQuotationShipmentInfoApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: `/base/biz/warehouseShipmentQuotation/getQuotationShipmentInfo`,
    data
  });
};

// 报海外仓运单报价-审批
export const businessApprovalApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: `/base/biz/warehouseShipmentQuotation/businessApproval`,
    data
  });
};

// 导出海外仓运单报价excel
export const getWarehouseShipmentQuotationExcelListApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: `/export/biz/exportExcel/getWarehouseShipmentQuotationExcelList`,
    data
  });
};
